//
//  PaomaViewControll.m
//  ELife
//
//  Created by feng lu on 11-5-18.
//  Copyright 2011年 __MyCompanyName__. All rights reserved.
//

#import "PaomaViewControll.h"


@implementation PaomaViewControll
@synthesize labelShow;

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
    }
    self.clipsToBounds = YES;
    [self setBackgroundColor:[UIColor orangeColor]];
    labelShow = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 2500, 20)];
    labelShow.backgroundColor = [UIColor clearColor];
    labelShow.textColor = [UIColor blackColor];
    labelShow.font = [UIFont systemFontOfSize:15.0f];
    [self addSubview:labelShow];
    
    return self;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/

- (void)dealloc
{
    [labelShow release];
    [super dealloc];
}


-(void) paoma
{
    CGRect frame = labelShow.frame;
	frame.origin.x = 150;
	labelShow.frame = frame;
	
	[UIView beginAnimations:@"testAnimation" context:NULL];
	[UIView setAnimationDuration:30.0f];  
	[UIView setAnimationCurve:UIViewAnimationCurveLinear]; 	
    //[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:labelShow cache:NO];
	[UIView setAnimationDelegate:self];  
	[UIView setAnimationRepeatAutoreverses:NO];	 
	[UIView setAnimationRepeatCount:99999999]; 
	
	frame = labelShow.frame;
	frame.origin.x = -2500;
	labelShow.frame = frame;
	[UIView commitAnimations];  	
    
}

@end
